<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta name="keywords" content="Web前端视频教程,大数据视频教程,HTML5视频教程,UI视频教程,PHP视频教程,java视频教程,python基础教程">
    <meta name="description" content="智游教育在线课程视频,为您提供java,python,HTML5,UI,PHP,大数据等学科经典视频教程在线浏览学习,精细化知识点解析,深入浅出,想学不会都难,智游教育,学习成就梦想！">
    <meta name="author" content="尚忠祥">
    <link rel="stylesheet" href="css/base.css">
    <link rel="stylesheet" href="css/profile.css">
    <link rel="icon" href="favicon.png" type="image/png">
    <script src="js/jquery-1.8.3.js"></script>
    <title>在线公开课-智游教育|java|大数据|HTML5|python|UI|PHP视频教程</title>
    <script type="text/javascript">
     
     var regIsCommitOldPass=false;
     var regIsCommitPsw=false;
     
     $(function(){
           /* 原密码跟数据库的密码校验是否正确 */
        $("#oldPassword").blur(function(){
          var oldPass =$("#oldPassword").val();
         // alert(oldPass);
          if (null !=oldPass && oldPass !="") {
			var params ={"password":oldPass};
			//alert(params);
			//利用ajax进行密码校验
			$.post("validatePassword.action",params,function(data){
			     // alert(data);
			      if (data=="success") {
			           regIsCommitOldPass=false;
					$("#oldMsg").text("原密码正确").css("color","green");
				}else{
				     regIsCommitOldPass=true;
				    $("#oldMsg").text("原密码错误").css("color","red");
				}
			
			});
		}
        
        });
              /* 两次新密码的输入 */
          $("#newPassword02").blur(function(){
              var pass01=$("#newPassword").val();
              var pass02=$("#newPassword02").val();
              if (null ==pass01 || ""==pass01||null ==pass02 || ""==pass02 ) {
				 regIsCommitPsw=false;
				$("#passMsg").text("密码不能为空").css("color","red");
			}else{
			     if (pass01!=pass02) {
			         regIsCommitPsw=false;
					$("#passMsg").text("密码输入不一致，请重新输入").css("color","red");
				}else{
				   regIsCommitPsw=true;
				   $("#passMsg").text("");
				}
			
			
			}
           
          });
        
        });
    
    </script>
</head>

<body class="w100">
    <header>
        <div class="container top_bar clearfix">
            <img src="img/logo.png" alt="智游">
            <div id="tele">
                <span>4006-371-555</span>
                <span>0371-88888598</span>
            </div>
        </div>
        <menu>
            <div class="container clearfix">
                <ul class="clearfix f_left">
                    <li><a href="./index.jsp">首页</a></li>
                    <li><a href="./course.html">课程</a></li>
                    <li><a href="#">关于我们</a></li>
                    <li class="menu_active"><a href="showMyProfile.action">个人中心</a></li>
                </ul>
                <div id="search_group">
                    <input type="text" placeholder="搜索课程">
                    <span id="search"></span>
                </div>
                <div id="user_bar">
                    <a href="./myProfile.html">
                    <c:if test="${empty user.imgurl}">
                                 <img  src="img/avatar_lg.png">
                            </c:if>
                            
                            <c:if test="${not empty user.imgurl}">
                                  <img  src="${user.imgurl}">
                       </c:if>
                    </a>
                    <a href="javascript:;" id="lay_out">退出</a>
                </div>
            </div>
        </menu>
    </header>
    <main>
        <div class="container">
            <h2>我的资料</h2>
            <div id="profile_tab">
                <ul class="profile_tab_header f_left clearfix">
                    <li><a href="changeProfile.action">更改资料</a></li>
                    <li class="profile_tab_line">|</li>
                    <li><a href="changeAvatar.action">更改头像</a></li>
                    <li class="profile_tab_line">|</li>
                    <li class="profile_tab_active"><a href="passwordSafe.action">密码安全</a></li>
                </ul>
                <div class="proflle_tab_body">
                    <h3><a href="./myProfile.html">返回个人中心</a></h3>
                    <div class="proflle_tab_workplace clearfix">
                        <div class="profile_avatar_area">
		                     <c:if test="${empty user.imgurl}">
		                         <img id="avatar" src="img/avatar_lg.png" alt="">
		                      </c:if>
		                      
		                      <c:if test="${not empty user.imgurl}">
		                         <img width="180px";height="180px"; id="avatar" src="${user.imgurl}" alt="">
		                      </c:if> 
                                
                             
                        </div>
                        <div class="profile_ifo_area">
                            <form action="updatePassword.action"><!-- 密码安全 -->
                                <div class="form_group">
                                    <span class="dd">旧&#x3000;密&#x3000;码：</span>
                                    <input id="oldPassword" type="password" name="oldpassword" ><span id="oldMsg"></span>
                                </div>
                                <div class="form_group">
                                    <span class="dd">新&#x3000;密&#x3000;码：</span>
                                    <input id="newPassword" type="password" name="password">
                                </div>
                                <div class="form_group">
                                    <span class="dd">确认新密码：</span>
                                    <input id="newPassword02" type="password" name="password02"><span id="passMsg"></span>
                                </div>
                                <div class="form_submit dd">
                                    <input type="submit" value="保&#x3000;存">
                                    <a href="./change_profile.html">取消</a>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </main>
    <footer>
        <div class="container">
            <ul>
                <li><img src="img/footer_logo.png" alt="" id="foot_logo"></li>
                <li>版权所有：智游3G教育&#x3000;&#x3000;&#x3000;&copy;&nbsp;www.zhiyou100.com</li>
                <li><img src="img/微信公众号.png" alt="" id="wxgzh"></li>
            </ul>
        </div>
    </footer>
</body>

</html>